<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue-2.6.10.js"></script>

</head>
<body>
    <div id="app">
       <!-- <button v-on:click="add">佳佳</button>-->
        <button v-on:click="num--">减少</button>
        <button @click="num++">加加</button>

        <button @click.stop="print">点我试试，跳</button>
        <h2>{{num}}</h2>

        阻止默认事件发生:
    <a href="https://www.baidu.com" @click.prevent="">跳百度</a>
    </div>
<script type="text/javascript">
    var app=new Vue({
        el:"#app",
        data:{
            num:0
        },
        methods:{
           /* add: function(){
              location.href="demo01.html";
                console.log("hello!!")
            }*/
            /*less(){
                this.num--;
            }*/
            print(){
               //alert("弹弹弹");
            }

        }

    })

</script>

</body>
</html>